<template>
  <div></div>
</template>
<script>

export default {
  data() {
    return {
      xuliehao: '',
      yanzhengma: '',
      xu: [],
      yan: [],
      token: '',
      areaId: '',
    }
  },
  created() {
    this.getid();
  },
  mounted() {

  },
  methods: {
    getUrlParms(name) {
      var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
      var r = window.location.search.substr(1).match(reg);
      if (r != null)
        return unescape(r[2]);
      return null;
    },
    getid() {
      //  sessionStorage.setItem('area', '0000097');
      //  sessionStorage.setItem('urseName', '杨文斌');
      //  this.$router.push('/video');

      var vm = this;
      vm.$axios.post('/api/cilent/validate?key=' + vm.getUrlParms("id"))
        .then(res => {
          console.log(res);
          if (res.data.status == "success") {
            sessionStorage.setItem('area', res.data.data);
            sessionStorage.setItem('urseName', res.data.logInfo.zhName);
            vm.$router.push('/video');
          }
          if (res.data.status == "error") {
            alert(res.data.message)
          }
        })
        .catch(err => {
        }) 
    },

  }
}

</script>
<style scoped>
</style>
